#!/bin/bash

# test cordova ===================
cordova --help > /dev/null
if [ "0" -eq "$?"];then
	# echo "cordova installed"
	:;
else
	echo "cordova not installed, installing...";
	npm install -g cordova;
fi
 
# test plugman ===================
plugman --help > /dev/null
if [ "0" -eq "$?"];then
	# echo "plugman installed"
	:;
else
	echo "plugman not installed, installing...";
	npm install -g plugman;
fi


# create project
cordova create hello com.example.hello HelloWorld

# platform android
cd hello
cordova platform add android
